1. Field of the Invention
This invention relates to an image coding apparatus, and more particularly to an image coding apparatus based on an adaptive quantization coding system for dividing image information into a plurality of blocks and subjecting the divided image information blocks to compression coding.
2. Description of the Related Art
When image information is converted into digital form and recorded on a recording medium such as a tape or disk, it is necessary to reduce the data rate with the recording capacity of the recording medium taken into consideration. For this purpose, various studies concerning the low bit rate coding method for reducing the code amount by making use of the redundancy of image data have been made.
A method often used as the above image coding method includes an orthogonal transform coding method. With this method, input digital image data is divided into a plurality of data blocks each constructed by m.times.n pixels, subjected to the orthogonal transform such as two-dimensional discrete cosine transform (DCT) for each block, and each of coefficients (transform coefficients) obtained in the above transform is subjected to the quantization process with a predetermined quantizer step size. After this, each quantized transform coefficient is rearranged in a one-dimensional array and subjected to the run-length coding process and then the code amount thereof is reduced by also using the variable length coding process or the like.
In addition to the above basic construction, an attempt may be sometimes made to improve the visual image quality by adaptively and selectively setting the quantizer step size for each block and reducing the quantizer step size for the block in which quantization distortion may easily occur at the time of coding so as to suppress the quantization distortion. At this time, in order to suppress the code amount, the quantizer step size for the block in which quantization distortion will not easily occur is increased.
In order to adaptively set the quantizer step size for each block, it is necessary to classify the blocks into blocks in which visual deterioration in the image quality may easily occur and blocks in which visual deterioration in the image quality will not easily occur. In the prior art, attention was paid only to the block to be subjected to quantization and a quantization mode was set by use of parameters calculated by the values of the pixels thereof or the value of the transform coefficient. For example, in "STUDY OF LOW BIT RATE CODING METHOD FOR DIGITAL VTR", Television Institute at Annual Convention 7-1, 1990, the block to be quantized is further divided into sub-blocks, whether the sub-block is a flat portion or includes a significantly varying portion is checked, and then the quantization characteristic is determined according to the checking result. This method is based on the assumption that the block in which deterioration in the image quality is distinctly observed is a block which contains a flat portion and a significantly varying portion and deterioration in the image quality will not be distinctly observed in the block having a significantly varying portion in the entire portion of the block and having substantially no flat portion even when the block is roughly quantized.
The above method is relatively effective in order to suppress extremely bad influence which is caused by the ringing occurring when the orthogonal transform coefficient obtained in the block is roughly quantized and which is given to the flat portion in the block in a case where an edge occurs in the block.
However, in a case where the quantizer step size for each block is controlled with the visual characteristics taken into consideration, it is more effective to pay much attention to the rough pattern structure of the image. For example, in the case of an isolated small pattern lying in the large flat portion in the image, deterioration in the image quality seems prominent even when small quantization distortion has occurred. On the other hand, in the case of an image portion having a widely spreading no-standardized pattern with complicated structure, for example, the scenery of nature or an image portion of random pattern, much deterioration is not visually observed even when slight deterioration due to the quantization distortion has occurred. However, a block with a size of 8.times.8 pixels is generally used, and in this case, it is impossible to control the quantizer step size with the visual characteristics based on the rough pattern taken into consideration in the conventional method in which the quantizer step size is determined only by use of the block to be quantized. Particularly, in an image of high resolution, since the size of the block is extremely small in comparison with the image size, it is difficult to distinguish a portion, in which significant deterioration occurs, from a portion, in which the deterioration is not distinctly observed.
Further, in the conventional method, the quantization widths for adjacent blocks become greatly different from each other in some cases and the image deterioration partially abruptly changes in the image, thereby giving an unnatural impression.